<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To Disable memory Integrity at Device Security # Configuration Type - COMPUTER # Refer : https://www.elevenforum.com/t/enable-or-disable-core-isolation-memory-integrity-in-windows-11.4942/ # Note : If the registry was changed but not effective, please advise the user to contact Windows Support. # Applicable: Windows 11 #> $path = "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" $Name = "Enabled" $valuedata = 0 # Check if the registry path exists if (-not (Test-Path $path)) { # Create the registry path if it does not exist New-Item -Path $path -Force Write-Host "Registry path '$path' created." } else { Write-Host "Registry path '$path' already exists." } # Create or update the registry value as a DWORD if (-not (Get-ItemProperty -Path $path -Name $Name -ErrorAction SilentlyContinue)) { New-ItemProperty -Path $path -Name $Name -Value $valuedata -PropertyType DWord -Force Write-Host "Registry value '$Name' created with value $valuedata (DWORD)." } else { Set-ItemProperty -Path $path -Name $Name -Value $valuedata Write-Host "Registry value '$Name' updated to $valuedata." }